Data.gov.sg was launched in 2011 as the government’s one-stop portal to its publicly-available data sets from 70 public agencies.

  • a personal project

  • find insights from making visualizations

  • Singapore is a small country facing unique challenges

  • all data from data.gov.sg, available under the Singapore Open Data License: https://data.gov.sg/open-data-licence

  • The Singapore Open Data Licence aims to promote and enable easy reuse of Public Sector data to create value for the community and businesses

1 Society

1.1 Births and Fertility

  • Singapore has one of the lowest fertility rates globally World Bank.

  • This despite many initiatives from the government to encourage more people to start families.

1.1.1 Crude Birth Rate

crude_birth_rate <- read_csv("data/births-and-fertility-annual/crude-birth-rate.csv")
## Rows: 59 Columns: 3
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): level_1
## dbl (2): year, value
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

1.1.1.1 The crude birth rate is the annual number of live births per 1,000 population (WHO). But the calcuation used by Singapore is the number of live births in a given year, per thousand mid-year population.

crude_birth_rate %>% 
  gg_line(x_var = year,
          y_var = value,
          title = "Crude Birth Rate (per 1,000 popultaion)",
          y_title = "",
          x_title = "",
          caption = "Graphic: @wyuet. Source: data.gov.sg",
          theme = theme_light())

1.2 Number of Live Births

live_births <- read_csv("data/births-and-fertility-annual/live-births.csv")
## Rows: 118 Columns: 3
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): level_1, value
## dbl (1): year
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#Convert value from chr to dbl
live_births$value <- as.double(as.character(live_births$value))

1.2.0.1 Live-births are defined as occurring within Singapore and its territorial waters as registered under the Registration of Births and Deaths Act (Chapter 267). Data are compiled based on date of occurrence.

live_births %>% 
  filter(level_1 == "Total Live-births") %>% 
  gg_line(x_var = year,
          y_var = value,
          title = "Number of live births",
          y_title = "",
          x_title = "",
          caption = "Graphic: @wyuet. Source: data.gov.sg",
          theme = theme_light())

1.3 Total Fertility Rate by Ethnic Groups

total_fertility_rate_by_ethnic_group <- read_csv("data/births-and-fertility-annual/total-fertility-rate-by-ethnic-group.csv")
## Rows: 177 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): level_1, level_2
## dbl (2): year, value
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

1.3.0.1 The Total Fertility Rate refers to the average number of live-births each female would have during her reproductive years if she were to experience the age-specific fertility rates prevailing during the period. It is derived by aggregating the age-specific fertility rates of females in each of the reproductive ages for a specific year.

total_fertility_rate_by_ethnic_group %>% 
  gg_line_col(x_var = year,
              y_var = value,
              col_var = level_2,
              title = "Total Fertility Rate by Ethnic Groups",
              y_title = "",
              x_title = "",
              col_title = "",
              caption = "Graphic: @wyuet. Source: data.gov.sg",
              theme = theme_light())

1.4 Total Fertility Rate by Age Groups

age_specific_fertility_rate <- read_csv("data/births-and-fertility-annual/age-specific-fertility-rate.csv")
## Rows: 413 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (3): level_1, level_2, value
## dbl (1): year
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#Convert value from chr to dbl
age_specific_fertility_rate$value <- as.double(as.character(age_specific_fertility_rate$value))

1.4.0.1 Total Fertility Rate by Age Groups refer to the number of live-births to females in a particular age group, per thousand females in that age group during the period.

  • Data prior to 1980 pertain to total population.

  • Data from 1980 onwards pertain to resident population (i.e. Singapore citizens and permanent residents).

age_specific_fertility_rate %>% 
  gg_line_col(x_var = year,
              y_var = value,
              col_var = level_2,
              title = "Total Fertility Rate by Age Groups",
              y_title = "",
              x_title = ,
              col_title = "",
              caption = "Graphic: @wyuet. Source: data.gov.sg",
              theme = theme_light())

2 Health

2.1 Life Expectancy

2.1.1 Life Expectancy at Birth

life_expectancy_at_birth_and_age_65_years <- read_csv("data/life-expectancy-by-sex-annual/life-expectancy-at-birth-and-age-65-years.csv")
## Rows: 86 Columns: 3
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): level_1
## dbl (2): year, value
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
life_expectancy_at_birth_and_age_65_years %>% 
  gg_line_col(x_var = year,
              y_var = value,
              col_var = level_1,
              x_title = "",
              y_title = "",
              col_title = "",
              title = "Life Expectancy at Birth",
              caption = "Graphic: @wyuet. Source: data.gov.sg",
              theme = theme_light())

2.1.2 Life Expectancy by Gender

life_expectancy_at_birth_and_age_65_years_by_sex <- read_csv("data/life-expectancy-by-sex-annual/life-expectancy-at-birth-and-age-65-years-by-sex.csv")
## Rows: 172 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): level_1, level_2
## dbl (2): year, value
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
life_expectancy_at_birth_and_age_65_years_by_sex %>% 
  gg_line_col(x_var = year,
              y_var = value,
              col_var = level_2,
              x_title = "",
              y_title = "",
              col_title = "",
              title = "Life Expectancy by Gender",
              caption = "Graphic: @wyuet. Source: data.gov.sg",
              theme = theme_light())

2.2 Total Number of Deaths

total_number_of_deaths <- read_csv("data/principal-causes-of-death/total-number-of-deaths.csv")
## Rows: 15 Columns: 2
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (2): year, no_of_deaths
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
total_number_of_deaths %>% 
  gg_line(x_var = year,
          y_var = no_of_deaths,
          title = "Total Number of Deaths (Annual)",
          x_title = "",
          y_title = "",
          caption = "Graphic: @wyuet. Source: data.gov.sg",
          theme = theme_light())

2.3 Principal Causes of Death

principal_causes_of_death <- read_csv("data/principal-causes-of-death/principal-causes-of-death.csv")
## Rows: 152 Columns: 6
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (3): icd, classification, disease_condition
## dbl (3): year, rank, percentage_deaths
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

3 Infrastruture

3.1 Housing

  • Being an island state, land is not a plentiful resource, and thus housing is a perennial issue.

  • The majority of people live in public housing, and the term evokes a different image compared to other countries.

  • A small proportion of people live in private landed properties.

3.1.1 Flats Constructed By Housing And Development Board, Annual

flats_constructed_by_housing_and_development_board_annual <- read_csv("data/flats-constructed/flats-constructed-by-housing-and-development-board-annual.csv")
## Rows: 41 Columns: 2
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (2): year, flats_constructed
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
flats_constructed_by_housing_and_development_board_annual %>% 
  gg_line(x_var = year,
          y_var = flats_constructed,
          title = "Flats Constructed by Housing and Development Board (Annual)",
          y_title = "",
          x_title = "",
          caption = "Graphic: @wyuet. Source: data.gov.sg",
          theme = theme_light())

3.1.2 Resale Flat Prices

3.1.2.1 Resale flat prices based on registration date from Jan-2017 onwards

resale_flat_prices_based_on_registration_date_from_jan_2017_onwards <- read_csv("data/resale-flat-prices/resale-flat-prices-based-on-registration-date-from-jan-2017-onwards.csv")
## Rows: 127188 Columns: 11
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (8): month, town, flat_type, block, street_name, storey_range, flat_mode...
## dbl (3): floor_area_sqm, lease_commence_date, resale_price
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#Convert value from chr to dbl
#resale_flat_prices_based_on_registration_date_from_jan_2017_onwards$month <- as.double(as.character(resale_flat_prices_based_on_registration_date_from_jan_2017_onwards$month))
#resale_flat_prices_based_on_registration_date_from_jan_2017_onwards %>% 
  #gg_smooth_col(x_var = month,
  #              y_var = resale_price,
  #              col_var = flat_type,
  #              title = "Resale Flat Prices from Jan 2017",
  #              y_title = "",
  #              caption = "Graphic: @wyuet Source: data.gov.sg",
  #              theme = theme_light())

4 Food Production

4.1 Total Value of Annual Food Prodcution (million SDG)

value_of_local_food_production_in_singapore <- read_csv("data/value-of-local-food-production/value-of-local-food-production-in-singapore.csv")
## Rows: 9 Columns: 5
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (5): year, vegetables, seafood, hen_shell_eggs, local_landings
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#convert data to long format
value_of_local_food_production_in_singapore_long <- melt(value_of_local_food_production_in_singapore, id = "year")
value_of_local_food_production_in_singapore_long %>% 
  gg_hbar_col(x_var = value,
              y_var = year,
              col_var = variable,
              x_title = "",
              y_title = "",
              col_title = "",
              title = "Value of Local Food Production (million SGD)",
              caption = "Graphic: @wyuet. Source: data.gov.sg",
              theme = theme_light())

5 Environment

5.1 CO2 Emissions from Fossil Fuels

carbon_dioxide_emissions_from_combustion_of_fossil_fuels <- read_csv("data/climate-change-and-energy-carbon-dioxide-emissions-from-combustion-of-fossil-fuels/carbon-dioxide-emissions-from-combustion-of-fossil-fuels.csv")
## Rows: 7 Columns: 2
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (2): year, co2_emissions
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
carbon_dioxide_emissions_from_combustion_of_fossil_fuels %>% 
  gg_line(x_var = year,
          y_var = co2_emissions,
          title = "Carbon Dioxide Emissions (From Combustion of Fossil Fuels)",
          x_title = "",
          y_title = "",
          caption = "Graphic: @wyuet. Source: data.gov.sg",
          theme = theme_light())

5.2 Waste Disposed Of And Recycled (Annual)

waste_disposed_of_and_recycled_annual <- read_csv("data/waste-disposed-of-and-recycled-annual/waste-disposed-of-and-recycled-annual.csv")
## Rows: 15 Columns: 3
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (3): year, waste_disposed_of, waste_recycled
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#change data to long format
waste_disposed_of_and_recycled_annual_long <- melt(waste_disposed_of_and_recycled_annual, id = "year")
waste_disposed_of_and_recycled_annual_long %>% 
  gg_hbar_col(x_var = value,
              y_var = year,
              col_var = variable,
              y_rev = TRUE,
              x_title = "",
              y_title = "",
              title = "Waste Disposed Of And Recycled (Annual)",
              col_title = "",
              caption = "Graphic: @wyuet. Source: data.gov.sg",
              theme = theme_light())

6 Contact